package com.qf.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("goods")
public class Goods {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @TableField("item_id")
    private String type;
    @TableField("goods_id")
    private Integer goodId;

    private String title;
    @TableField("small_pic")
    private String imageSrc;

    private BigDecimal price;  //价格

    private String status;  // 状态
    @TableField("stock_num")
    private Integer stock;  //库存

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("create_time")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("update_time")
    private Date updateTime;


}
